class UserMailer < ActionMailer::Base
  default :from => "admin@expression.com"
  def deliver_remember(user)
    @user = user #get information and create instance variable for send to message
    mail(:to => user.email, :subject => "Datos de registro a Expression")
  end

  def deliver_message(email)

    @user=email[:user]
    @recipient=email[:recipient]
    @message=email[:message]
    @user_url=email[:user_url]
    @reply_url=email[:reply_url]

    mail(:subject => email[:message].subject, :from => "Expression <do-not-reply@expression.com>", :to => email[:recipient].email)
  end

  def deliver_friend_request(email)
    @user=email[:user]
    @friend=email[:friend]
    @accept_url=email[:accept_url]
    @decline_url=email[:decline_url]
  mail(:subject => 'Nueva solicitud de amistad de Expression', :to =>email[:friend].email)
  end
end